<template>
	<view>
		<image class="top-img" :src="brandObj.white_logo" mode="widthFix" :style="{backgroundColor: brandObj.theme_color}"></image>
		<view class="teacher-name-box">
			<text class="teacher-name">{{brandObj.name}}</text>
		</view>
		<view class="content">
			<jyf-parser :html="html" ref="article"></jyf-parser>
		</view>

	</view>
</template>

<script>
	import parseHtml from '../../common/html_parse.js'
	import {
		Brand
	} from '@/models/brand.js'
	const brandModel = new Brand()
	export default {
		data() {
			return {
				brandObj: null
			}
		},
		methods: {
			_loadData(id) {
				brandModel.getBrandDetail(id, (res) => {
					this.brandObj = res
					this.html = res.detail
				})
			}
		},
		onLoad(options) {
			this._loadData(options.id)
		}
	}
</script>

<style>
	.top-img {
		width: 710rpx;
		padding: 40rpx;
	}

	.teacher-name-box {
		width: 710rpx;
		margin: 20rpx auto;
		font-weight: bold;
	}

	.teacher-name {
		padding-bottom: 20rpx;
		border-bottom: 4rpx solid #6ec2ae;
	}

	.content {
		width: 710rpx;
		margin: 40rpx auto;
		font-size: 26rpx;
		color: #333;
	}
</style>